import Vue from 'vue'
import App from './App.vue'
import useStore from "@/store";
import router from './router'
import * as echarts from 'echarts'
import ECharts from 'vue-echarts'
Vue.component('v-chart', ECharts)
Vue.prototype.$echarts = echarts;
Vue.config.productionTip = false
import 'amfe-flexible'
import MonthPicker from "./components/month-picker.vue"
Vue.component('month-picker',MonthPicker)
import VTable from "./components/v-table"
Vue.component('v-table',VTable)
import util from './libs/util'
Vue.prototype.$util = util
Vue.prototype.$http = util.http
// 时间转换工具
import TimeUtil from './libs/timeUtil'
Vue.prototype.$timeUtil = TimeUtil
import { createPinia, PiniaVuePlugin } from 'pinia'
import { createPersistedState } from 'pinia-persistedstate-plugin'
Vue.use(PiniaVuePlugin)
const pinia = createPinia()
// pinia.use(createPersistedState()) //开启缓存，存储在localstorage
Vue.prototype.bus = new Vue();
Vue.use(pinia)
var vue = new Vue({
  router,
  render: h => h(App)
});

const store = useStore()
Vue.prototype.$store = store

vue.$mount('#app')